import request from '@/utils/request'

// 查询模块-地址中间列表
export function listAddress(query) {
  return request({
    url: '/system/address/list',
    method: 'get',
    params: query
  })
}

export function haveListAddress(query) {
  return request({
    url: '/business/module/address/have/list',
    method: 'get',
    params: query
  })
}

export function notHaveListAddress(query) {
  return request({
    url: '/business/module/address/notHave/list',
    method: 'get',
    params: query
  })
}



// 查询模块-地址中间详细
export function getAddress(moduleId) {
  return request({
    url: '/system/address/' + moduleId,
    method: 'get'
  })
}

// 新增模块-地址中间
export function addModuleAddress(data) {
  return request({
    url: '/business/module/address',
    method: 'post',
    data: data
  })
}

// 修改模块-地址中间
export function updateAddress(data) {
  return request({
    url: '/system/address',
    method: 'put',
    data: data
  })
}

// 删除模块-地址中间
export function delModuleAddress(moduleId) {
  return request({
    url: '/business/module/address/' + moduleId,
    method: 'delete'
  })
}

export function deleteModuleAddress(data) {
  return request({
    url: '/business/module/address',
    method: 'delete',
    data: data
  })
}
